package com.wenwan.manage.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wenwan.manage.service.GiveGetExamineService;

import javax.annotation.Resource;

/**
 * 供求文章审核 过 的
 * 
 * @author Admin
 *
 */
@Controller
@RequestMapping(value = "/give/get/examine")
public class GiveGetExamineController {

	@Autowired
	private GiveGetExamineService giveGetExamineService;

	@ResponseBody
	@RequestMapping(value = "/create/or/update", method = { RequestMethod.POST })
	public Map<String, Object> createOrUpdate(@RequestParam(required = true) String giveGetId,
			@RequestParam(required = true) Boolean isAdopt) {
		return giveGetExamineService.createOrUpdate(giveGetId, isAdopt);
	}

	@ResponseBody
	@RequestMapping(value = "/delete/by/give/get/id", method = { RequestMethod.POST })
	public Map<String, Object> deleteByGiveGetId(@RequestParam(required = true) String giveGetId) {
		return giveGetExamineService.deleteByGiveGetId(giveGetId);
	}

}
